// CVisImageIO.h
// Developed by Yang Yu (yuy@janelia.hhmi.org), Oct 1, 2012
//

#ifndef __CVISIMAGEIO_H__
#define __CVISIMAGEIO_H__

#include "CVisUtility.h"
#include "CVisNiftiImageIO.h"

//
class CVisImageIO
{

public:
    CVisImageIO();
    ~CVisImageIO();

public:

    // read
    bool read(char* filename);

    // write
    bool write(char* filename);

    //
    char* getFileName();
    void setFileName(char* FileName);

    LONG64 getDimx();
    LONG64 getDimy();
    LONG64 getDimz();
    LONG64 getDimc();
    LONG64 getDimt();

    void setDimx(LONG64 x);
    void setDimy(LONG64 y);
    void setDimz(LONG64 z);
    void setDimc(LONG64 c);
    void setDimt(LONG64 t);

    int getDataType();
    void setDataType(unsigned short dt);

    void* getData();

    void setFileFormat(FileFormat ff);

private:
    void *m_imagebuff;

    char* m_FileName;

    FileFormat format;

    unsigned short m_PixelType;
    unsigned short m_ComponentType;

    LONG64 dimx, dimy, dimz, dimc, dimt; // dimension
    double dx, dy, dz, dc, dt; // spacing
};

#endif // __CVISIMAGEIO_H__
